<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
	
    <!--360 browser -->
    <meta name="renderer" content="webkit">
    <meta name="author" content="wos">
    <!-- Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="<c:url value="/qianduan/images/i/app.png"></c:url>">
    <!--Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="apple-touch-icon-precomposed" href="<c:url value="/qianduan/images/i/app.png"></c:url>">
    <!--Win8 or 10 -->
    <meta name="msapplication-TileImage" content="<c:url value="/qianduan/images/i/app.png"></c:url>">
    <meta name="msapplication-TileColor" content="#e1652f">

    <link rel="icon" type="image/png" href="<c:url value="/qianduan/images/i/favicon.png"></c:url>">
    <link rel="stylesheet" href="<c:url value="/qianduan/assets/css/amazeui.css"></c:url>">
    <link rel="stylesheet" href="<c:url value="/qianduan/css/public.css"></c:url>">

    <!--[if (gte IE 9)|!(IE)]><!-->
    <script src="<c:url value="/qianduan/assets/js/jquery.min.js"></c:url>"></script>
    <!--<![endif]-->
    <!--[if lte IE 8 ]>
    <script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
    <script src="assets/js/amazeui.ie8polyfill.min.js"></script>
    <![endif]-->
    <script src="<c:url value="/qianduan/assets/js/amazeui.min.js"></c:url>"></script>
    <script src="<c:url value="/qianduan/js/public.js"></c:url>"></script>
    <script src="<c:url value="/qianduan/js/jquery-3.1.0.min.js"></c:url>"></script>
   
</head>
<body>

<header class="am-topbar am-topbar-fixed-top wos-header">
    <div class="am-container">
        <h1 class="am-topbar-brand">
            <a href="#"><img src="<c:url value="/qianduan/images/logo.png"></c:url>" alt=""></a>
        </h1>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-warning am-show-sm-only"
                data-am-collapse="{target: '#collapse-head'}">
            <span class="am-sr-only">导航切换</span>
            <span class="am-icon-bars"></span>
        </button>

        <div class="am-collapse am-topbar-collapse" id="collapse-head">
            <ul class="am-nav am-nav-pills am-topbar-nav">
                <li class="am-active"><a href="<c:url value='/main/toIndex'></c:url>">首页</a></li>
                <li><a href="<c:url value='/main/toForum?pageId=1'></c:url>">话题列表</a></li>
                <li><a href="<c:url value="/fileSource/getFilesourceList?type=1&pageId=1"></c:url>">资料下载</a></li>
                 <li><a href="<c:url value='/index/toImage?pageIndex=1'></c:url>">图片墙</a></li>
                <li><a href="#">个人信息</a></li>
            </ul>
			
            <div class="am-topbar-right">
                <a href="<c:url value='/index/logout'></c:url>" class="am-btn am-btn-default am-topbar-btn am-btn-sm"><span class="am-icon-pencil">注销</span></a>
            </div>

           <div class="am-topbar-right">
                <button class="am-btn am-btn-danger am-topbar-btn am-btn-sm"><span class="am-icon-user"></span> ${currentUser.name}</button>
            </div>
        </div>
    </div>
</header>

<div class="am-g am-container padding-none">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-8 newshui">
     <h1 class="am-titlebar-title ">
                话题列表
            </h1>
        <div data-am-widget="list_news" class="am-list-news am-list-news-default ">
            <div class="am-list-news-bd">
                <ul class="am-list">
                   

				<c:forEach items="${forumList}" varStatus="status" var="forum">
					 <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" >
                         <div class="am-u-sm-4 am-list-thumb">
		                            <c:if test="${ status.index == 0  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/1.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 1  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/2.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 2  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/3.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 3  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/4.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 4  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/5.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 5  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/6.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 6  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/7.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            <c:if test="${ status.index == 7  }">
		                            <a href="#">
		                                <img src="<c:url value="/qianduan/images/forum/8.jpg"></c:url>" />
		                            </a>
		                            </c:if>
		                            
		                     </div>
                        <div class=" am-u-sm-7 am-list-main">
                            <h3 class="am-list-item-hd"><a href="<c:url value='/main/toPersonalTopic?pageId=1&forumid=${forum.id}'></c:url>">${forum.name }</a></h3>

                            <div class="am-list-item-text"><h2>${forum.description}</h2></div>

                        </div>
                    </li>
                    <div class="newsico am-fr">
                        <i class="am-icon-hand-pointer-o">热度：${forum.topiccount}</i>
                    </div>
				</c:forEach>
                        



                </ul>

                <ul data-am-widget="pagination" class="am-pagination am-pagination-default">

                    <li class="am-pagination-first ">
                        <a href='<c:url value="/main/toForum?pageId=1"></c:url>' class="">第一页</a>
                    </li>
					<c:if test="${forumvo.currentPage > 1}">
						<li class="am-pagination-prev ">
                        <a href='<c:url value="/main/toForum?pageId=${forumvo.currentPage -1}"></c:url>' class="">上一页</a>
                    </li>
					</c:if>
					
					<c:if test="${forumvo.totalPage < 5}">
						<c:forEach var="i" begin="1" end="${forumvo.totalPage}" step="1">
							<li class="">
                        		<a href='<c:url value="/main/toForum?pageId=${i}"></c:url>' class="">${i}</a>
                    		</li>
						</c:forEach>
					</c:if>
					
					<c:if test="${forumvo.totalPage > 5 && forumvo.currentPage >2}">
						<c:forEach var="i" begin="${forumvo.currentPage - 2 }" end="${forumvo.currentPage + 2}" step="1">
							<li class="">
                        		<a href='<c:url value="/main/toForum?pageId=${i}"></c:url>' class="">${i}</a>
                    		</li>							
						</c:forEach>
					</c:if>
					
					<c:if test="${forumvo.totalPage > 5 && forumvo.currentPage < 3}">
						<c:forEach var="i" begin="1" end="5" step="1">
							<li class="">
                        		<a href='<c:url value="/main/toForum?pageId=${i}"></c:url>' class="">${i}</a>
                    		</li>
						</c:forEach>
					</c:if>
					
					<c:if test="${forumvo.currentPage < forumvo.totalPage}">
						<li class="am-pagination-next ">
                        	<a href='<c:url value="/main/toForum?pageId=${forumvo.currentPage + 1}"></c:url>' class="">下一页</a>
                   	 	</li>
					</c:if>

                    <li class="am-pagination-last ">
                        <a href='<c:url value="/main/toForum?pageId=${forumvo.totalPage}"></c:url>' class="">最末页</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="am-u-sm-0 am-u-md-0 am-u-lg-4 padding-none am-hide-sm">
        <div class="tag">
            <div data-am-widget="titlebar" class="am-titlebar am-titlebar-default" >
                <h2 class="am-titlebar-title ">
                    热门话题
                </h2>
            </div>
            <ul>
            	<c:forEach items="${hotForumList}" var="forum" varStatus="status">
                	<li>
                	<a href="<c:url value='/main/toPersonalTopic?pageId=1&forumid=${forum.id}'></c:url>">${forum.name}</a>
                	</li>
                </c:forEach>
            </ul>
            <div class="am-cf"></div>
        </div>
    </div>
</div>


<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" >
    <a href="#top" title="回到顶部">
        <span class="am-gotop-title">回到顶部</span>
        <i class="am-gotop-icon am-icon-chevron-up"></i>
    </a>
</div>

<footer>
    <div class="content">
        <ul class="am-avg-sm-5 am-avg-md-5 am-avg-lg-5 am-thumbnails">
            <li><a href="#">联系我们</a></li>
            <li><a href="#">加入我们</a></li>
            <li><a href="#">合作伙伴</a></li>
            <li><a href="#">广告及服务</a></li>
            <li><a href="#">友情链接</a></li>
        </ul>
        <p>© 2016 AllMobilize, Inc. Licensed under MIT license. Developed with WebStorm.</p>

    </div>
</footer>
</body>
</html>